package kernel_gui.interfaces.kernel_gui;

import common.entities.enums.ACTION;
import common.entities.persistent.Genre;
import common.entities.persistent.Movie;

/**
 * @author Yoyo
 *
 */
public interface IManageGenre {

	/**
	 * delete/update/create a genre
	 * <br><br>
	 * <b>On Success</b> - will call gui's returnAnswer with Boolean value 'true'
	 * <br>
	 * <b>On fail</b> - will call gui's returnError with the right error message
	 * <br>
	 * @param genere
	 */
	void actionGenre(ACTION action, Genre genre , int requestId);

	
	/**
	 * Counts how many genre records in the DB match wanted query
	 * 
	 * <br><br>
	 * <b>On Success</b> - will call gui's returnAnswer with Integer value holding number of records
	 * <br>
	 * <b>On fail</b> - will call gui's returnError with the right error message
	 * <br>
	 * @param GenreSubStr - null if not needed
	 */
	void countGenres(String GenreSubStr, Movie movie, int requestId);
	
	/**
	 * Gets the set of genres from DB that match wanted query ordered by genre name
	 * <br><br>
	 * <b>On Success</b> - will call gui's returnAnswer with List<Genre> that match wanted query  (no matches is counted as success - empty list)
	 * <br>
	 * <b>On fail</b> - will call gui's returnError with the right error message
	 * <br>
	 * @param GenreSubStr - null if not needed
	 * @param from 
	 * @param to
	 * 
	 */
	void getGenres(String GenreSubStr, int from, int to, int requestId);
	

}
